create external table jms_dm.dm_reverse_marking_performance_detail_dt (
   date_time date comment '日期 ',
   arrival_time timestamp comment '到件时间',
   waybill_no string comment '运单号',
   business_type string comment '客户标签',
   is_door int comment '是否送货上门1是0否',
   is_performance_flag int comment '是否派前电联1是0否',
   call_start_time timestamp comment '通话开始时间	',
   call_end_time timestamp comment '通话结束时间	',
   call_connect_status string comment '通话状态	',
   call_duration_seconds int comment '实际通话时长',
   instore_time timestamp comment '入库时间',
   business_name string comment '投递类型',
   sign_time timestamp comment '签收出库时间',
   signed_type string comment '签收类型',
   scan_user_code string comment '派件员code',
   scan_user string comment '派件员name',
   scan_site_code string comment '扫描网点code',
   scan_site_name string comment '扫描网点name',
   fran_code string comment '加盟商code',
   fran_name string comment '加盟商',
   agent_code string comment '代理区code',
   agent_name string comment '代理区',
   ordersource_code string comment '订单来源coed',
   ordersource_name string comment '订单来源',
   is_reback int comment '是否退件',
   gp_flg int comment '共配标签1是0否',
   pc_flg int comment 'pc端标签1是0否'
) COMMENT '逆向打标履约监控'
PARTITIONED BY (dt STRING COMMENT '')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_reverse_marking_performance_detail_dt'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);

alter table jms_dm.dm_reverse_marking_performance_detail_dt add columns(
  source                  bigint comment '履约来源'
 ,up_waybill_no           string comment '依赖单号'
 ,is_door2                bigint comment '应上门中的送货上门'
 ,is_performance_flag2    bigint comment '应电联中的电联'
 ,count_num               bigint comment '同一批的单量'
 ,sum_performance         bigint comment '同一批的单量是否有派前电联'
 ,receiver_mobile_phone   string comment '电话批次'

 ) cascade
